#include <iostream>
#include <algorithm>
using namespace std;

int main() {
    int n;
    cin >> n;
    string s;
    for (int i = 0; i < n; ++i) {
        s += 'A' + i;
    }
    do {
        for(int i=0;i<n-1;i++){
        	cout<<s[i]<<'+';
		} 
		cout<<s[n-1]<<" Problem"<<endl; 
    } while (next_permutation(s.begin(), s.end()));
    return 0;
}
